package com.neo.push.server.message;

import com.neo.push.core.AcceptPush;

import java.util.List;

/**
 * Created by lock on 17-7-31.
 */
public interface MessageMapper {

    /**
     * 获取接收者的离线消息
     * @param receiver
     * @return
     */
    List<AcceptPush> loadReceiverOffline(String receiver);

    /**
     * 获取推送消息
     * @param messageId
     */
    AcceptPush loadPushMessage(String messageId);

    /**
     * 更新单个消息的状态
     * @param messageId
     * @param received
     */
    void updateMessageState(String messageId, PushMessageState received);


    /**
     * 保存已推送的消息
     * @param pushMessage
     */
    AcceptPush savePushMessage(AcceptPush pushMessage);

}
